/* eslint-disable react-hooks/rules-of-hooks */

import logo from "../../assets/Star_Wars_Logo.svg";
import compose from "compose-function";
import "./styles.sass";

const Layout = (component: () => React.ReactNode) => () => {
  return (
    <div className="layout">
      <div className="layout-banner">
        <img src={logo} alt="Star Wars" height={110} />
      </div>
      <div>{component()}</div>
    </div>
  );
};

export const withLayout = compose(Layout);
